<!--
/**************************************************
* @(#)ordertempinput.jsp
*
* Copyright (c) 2005 Hitrust Technology Inc.
* Developed by SDC, Hitrust.
* All Rights Reserved.
*
* Modify History:
*  v1.00, 2006/02/08, SimonyiPeng
*  1) first release
/**************************************************
-->
<%@ page contentType="text/html; charset=utf-8" %>
<%@ page import="java.util.*"%>
<%@ include file="../../common.jsp" %>
<html>
<head>
<title>送货单信息录入</title>
<META http-equiv=Content-Type content="text/html; charset=UTF-8">
<LINK href="<%=root%>/css/caigouxitong.css" type=text/css rel=stylesheet>
<SCRIPT language="JavaScript" src="<%=root%>/js/common.js"></SCRIPT>
<SCRIPT language="JavaScript" src="<%=root%>/js/calendar2.js"></SCRIPT>
<SCRIPT language="JavaScript" src="<%=root%>/js/string.js"></SCRIPT>
</head>

<%

//备注字段长度
int memoLen = 800;

ArrayList deptList = new ArrayList();
ArrayList addrList = new ArrayList();

ArrayList ary = (ArrayList)request.getAttribute("organdaddr");
deptList = (ArrayList)ary.get(0);
addrList = (ArrayList)ary.get(1);

%>


<script language='javascript'>

	<%
		//如果点击"保存并新增"按钮，在此作出保存成功提示
		if(request.getAttribute("SUCCESSMSG") != null)
			out.print("alert('"+request.getAttribute("SUCCESSMSG")+"');");
	%>
	
	
	
	var deptlist = new Array();
	var addrlist = new Array();
	var addrlisttemp ;
	//初始化
	<%for(int i=0;i<deptList.size();i++){%>
		deptlist[<%=i%>] = '<%=deptList.get(i)%>';
		<%ArrayList addrListTemp = (ArrayList)addrList.get(i);%>
		addrlisttemp = new Array();
		<%for(int j=0;j<addrListTemp.size();j++){%>
			addrlisttemp[<%=j%>] = '<%=addrListTemp.get(j)%>';			
		<%}%>
		addrlist[<%=i%>] = addrlisttemp;
	<%}%>

	function resetrow(rownum){
		document.getElementById("manufacturename"+i).value = "";
		document.getElementById("spec"+i).value = "";
		document.getElementById("type"+i).value = "";
		document.getElementById("brand"+i).value = "";
		document.getElementById("manufacturer"+i).value = "";
		document.getElementById("ordercount"+i).value = "";
		document.getElementById("quantunit"+i).value = "";
		document.getElementById("signinprice"+i).value = "";	
		document.getElementById("totalprice"+i).value = "";	
		document.getElementById("otherproperties"+i).value = "";	
		
		
	}
	
	function changeDeliverAddrByDept(){
		var deptid=eval('document.all.deptid.selectedIndex;');
		var deliveraddr = document.getElementById('deliveraddr');
		var length=deliveraddr.length;
		for (i=1;i<length;i++)
		{
			eval("document.all.deliveraddr.options["+(length-i)+"]=null;");
			document.getElementById('linkman_').value = "";
			document.getElementById('linktel_').value = "";
			document.getElementById('signinperson').value="";
		}
		//当选择了订货部门
		if(deptid!=0){
			var addrTemp = addrlist[deptid-1];
			for(i=0;i<addrTemp.length;i++){
				var msg = addrTemp[i];
				var sz = StringTokenize(msg,'|',0,null);
				var tempoption;
				tempoption=new	Option(sz[1],sz[1]);
				
				if(sz[2]==null) sz[2]="";
				if(sz[3]==null) sz[3]="";
				eval('document.all.deliveraddr.options[i+1]=tempoption;');
				if(addrTemp.length==1){
					eval('document.all.deliveraddr.options[i+1].selected=true;');
					changeDeliverAddr();
				}
			}
		}
	}
	
	function changeDeliverAddr(){
		var deptindex = document.getElementById('deptid').selectedIndex;
		var addrTemp = addrlist[deptindex-1];
		var msg = addrTemp[document.getElementById('deliveraddr').selectedIndex-1];

		var sz = StringTokenize(msg,'|',0,null);
		if(sz[2]==null) sz[2]="";
		if(sz[3]==null) sz[3]="";
		document.getElementById('linkman_').value=sz[2];
		document.getElementById('linktel_').value=sz[3];
		document.getElementById('signinperson').value=sz[2];
	}
	

	
	function submitForm(option){
		if("SA" == option){
			document.all.saveoption.value="SA";
		}
		if("S" == option){
			document.all.saveoption.value="S";
		}
		//if(ivmanuf()){
		//	if(checkNoneableValue()){
				document.form1.action='<%=response.encodeURL(root+"/A180706.do")%>';
				form1.submit();
		//	}
		//}
	}
	
	function checkNoneableValue(){
		var currentrownum = document.getElementById('currentrownum').value;
		var deptid = document.getElementById("deptid").value;
		var deliveraddr = document.getElementById("deliveraddr").value;
		var delivermode = document.getElementById("delivermode").value;
		var delivermode_ = document.getElementById("delivermode_").value;
		var balancemode = document.getElementById("balancemode").value;
		var balancemode_ = document.getElementById("balancemode_").value;
		var delivergoodsid = document.getElementById("delivergoodsid").value;
		var signindate = document.getElementById("signindate").value;
		var signinperson = document.getElementById("signinperson").value;
		
		var linkm = document.getElementById("linkman_").value;
		var linkt = document.getElementById("linktel_").value;
		if(deptid == null || deptid == "") {
			alert("请确认订货单位已经选择");return false;
		}
		if(deliveraddr == null || deliveraddr == ""){
			alert("请确认送货地址已经选择");	return false;
		}		
		if(delivermode == '2' && delivermode_ == ""){
			alert("请确认配送方式已经选择");	return false;
		}
		if(balancemode == '2' && balancemode_ == ""){
			alert("请确认结算方式已经选择");	return false;
		}
		if(delivergoodsid == null || delivergoodsid == ""){
			alert("请确认送货单号已经录入");	return false;
		}
		if(signindate == null || signindate == ""){
			alert("请确认签收日期已经选择");	return false;
		}
		if(signinperson == null || signinperson == ""){
			alert("请确认签收人已经录入");	return false;
		}	
		

		var sum = 0;
		for(i=1;i<=10;i++){
			var manufacturename = document.getElementById("manufacturename"+i).value;
			var spec = document.getElementById("spec"+i).value;
			var type = document.getElementById("type"+i).value;
			var brand = document.getElementById("brand"+i).value;
			var manufacturer = document.getElementById("manufacturer"+i).value;
			var ordercount = document.getElementById("ordercount"+i).value;
			var quantunit = document.getElementById("quantunit"+i).value;
			var signinprice = document.getElementById("signinprice"+i).value;			
			var otherproperties = document.getElementById("otherproperties"+i).value;			
			
			if(manufacturename != null && manufacturename != "") {
				if(spec == null || spec == ""){
					alert("请确认规格已经输入");	return false;
				}
				if(type == null || type == ""){
					alert("请确认型号已经输入");	return false;
				}
				if(brand == null || brand == ""){
					alert("请确认品牌已经输入");	return false;
				}
				if(manufacturer == null || manufacturer == ""){
					alert("请确认生产厂商已经输入");return false;
				}
				if(ordercount == null || ordercount == "")
				{
					alert("请确认签收数量已经输入");	
					return false;
				}
				if(isNaN(ordercount))
				{
					alert("签收数量必须是有效数字！");
					return false;
				}
				if(!isFloatNum(ordercount))
				{
					alert("请确认输入的签收数量必须大于0");	
					return false;
				}
				else
				{
					if(ordercount<=0) 
					{
						alert("签收数量必须大于0");
						return false;
					}
				}
				if(signinprice == null || signinprice == ""){
					alert("请确认签收价格已经输入");	return false;
				}
				if(isNaN(signinprice))
				{
					alert("签收价格必须是有效数字！");
					return false;
				}				
				if(!isFloatNum(signinprice)){
					alert("请确认输入的签收价格必须大于0");	
					return false;
				}
				else
				{
					if(signinprice<=0) 
					{
						alert("签收价格必须大于0");
						return false;
					}
				}
			}
			else{
				resetrow(i);sum = sum + i;
			}
		
		}
		if(sum == 55){
			alert("应急采购单必须至少录入一条产品明细");
			return false;
		}		
		return true;
	}
	
	function checkProvider(){
		var providershortname = document.getElementById("providername").value;
		providershortname = encodeURI(providershortname);
		if(providershortname == "" || providershortname == null)
			return false;
		document.all('iframe1').src="<%=response.encodeURL(root+"/jsp/iframe/checkProvider.jsp")%>?providername="+providershortname;

		return false;
	}
	
	function selectProvider(){
		var url="<%=response.encodeURL(root+"/A180702.do")%>";
		var returnv = window.open(url,null," center=Yes, help=No, resizable=Yes, status=Yes, width=960px, height=680px, scrollbars=yes");		
	}
	
	function newprovider(){
		//document.all.addprovider.focus();
		var url="<%=response.encodeURL(root+"/A180704.do")%>";
		var returnv = window.open(url,null," center=Yes, help=No, resizable=Yes, status=Yes, width=960px, height=680px, scrollbars=yes");		

	}
	
	function checkManufacture(rownum){
		var concentricityid = document.getElementById("concentricityid"+rownum).value;
		if(concentricityid == "" || concentricityid == null)
			return false;
		var providerid = document.getElementById("providerid").value;
		resetrow(rownum);
		document.getElementById("concentricityid"+rownum).value = concentricityid; 
		document.all('iframe1').src="<%=response.encodeURL(root+"/jsp/iframe/checkManufactureTemp.jsp")%>?rownum="+rownum+"&concentricityid="+concentricityid+"&providerid="+providerid;
		
		return false;
	}
	
	function checkDeliverGoodsId(){
		var delivergoodsid = document.getElementById("delivergoodsid").value;
		if  (event.keyCode==13){  
			if (delivergoodsid == "" || delivergoodsid == null || isEmpty(delivergoodsid)){
				document.getElementById("delivergoodsid").value = "";
				return false;	
			}

			document.all('iframe1').src="<%=response.encodeURL(root+"/jsp/iframe/checkdelivergoodsid.jsp")%>?&delivergoodsid="+delivergoodsid;
				
		}	
		keydown2("signindate");
	}
	
	

	
	function jsfschange(){
		var val = document.getElementById('balancemode');
		for(var i=0; i<val.options.length; i++) {
			if(val.options[i].selected && val.options[i].value == "2") {
				if(confirm('是否确认手工输入结算方式?')){
					document.getElementById('balancemode_').style.display='';
					document.getElementById('balancemode').style.display='none';
				}else{
					alert("请重新选择结算方式");
					val.options[0].selected = true;
				}
			}
		}
	}

	function psfschange(){
		var val = document.getElementById('delivermode');
		for(var i=0; i<val.options.length; i++) {
			if(val.options[i].selected && val.options[i].value == "2") {
				if(confirm('是否确认手工输入配送方式?')){
					document.getElementById('delivermode_').style.display='';
					document.getElementById('delivermode').style.display='none';
				}else{
					alert("请重新选择配送方式");
					val.options[0].selected = true;
				}
			}
		}
	}	
	
	function checkconcentricityid(index){
		if  (event.keyCode==13){  
			if (checkiscontentricityidexist(index))
				checkManufacture(index);
		}
		keydown2("ordercount"+index);
	}
	
	function checkiscontentricityidexist(index){
		var value = document.getElementById('concentricityid'+index).value;
		for(i=1;i<=10;i++){
			var val = document.getElementById('concentricityid'+i).value;
			if(value == val && index != i){
				alert("集中编码输入不正确，请输入十四位的集中编码！");
				document.getElementById('concentricityid'+index).value="";
				return false;
			}
		}
		return true;
	}
	
	function ivmanuf(){
		if(document.getElementById("providerid").value==null || document.getElementById("providerid").value==""){
			alert("请先选择供应商");
			return false;
		}
		for(i=1;i<=10;i++){
			var v1 = document.getElementById('manufacturename'+i).value;
			if(v1 == null || v1.length == 0) continue; 
			for(j=1;j<=10;j++){	
				if(j!=i){
					var v2 = document.getElementById('manufacturename'+j).value;
					if(v1 == v2){
						alert("产品名称输入不正确，请输入正确的产品名称！");
						return false;
					}
				}
			}
		}
		return true;
	}
	
	
	function setFocus(){
		document.all.deptid.focus();
	}
	

</script>

<body leftmargin="0" topmargin="0" bgcolor="#f5f5f5" onload='setFocus();'>
<input type='hidden' name='currmenu' value='1101'>
<center>

<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td height="20"> 
      <table width="100%" border="0" cellspacing="0" cellpadding="1">
        <tr height="20">
          <td height="20" width="1" class="mtxt_black">&nbsp;</td>
          <td height="30" width="758" class="mtxt_black" >送货单信息录入</td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td class="bg_line" height="2"></td>
  </tr>
</table>

<br>


<form name="form1" id="form1" method="post"  style="visibility: visible;">
<input type='hidden' name='saveoption' value=''>
<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
    <tr> 
        <td> 
            <table class=bg_table id=tableId	cellspacing=1 cellpadding=2 width=100% align=center border=0>
                <tbody> 
                <tr class="bg_column" height=20> 
                    	<td align=middle colspan="12">送货单总体信息</td>
                </tr>
               
                <tr class="bg_row_odd" height=20> 
                    <td class=top align=middle> 
                        <div align="center" class="txt_content">订货单位</div>
                    </td>
                    <td class=top align=center> 
                        <div align='left' class='txt_content'> 
		                	<select id='deptid' name='deptid' onChange='changeDeliverAddrByDept();' onKeyDown="keydown2('delivermode')">
                        		<option value='' selected>请选择..</option>
                    		<%
                    		for(int i=0;i<deptList.size();i++){
                    			String dept = (String)deptList.get(i);
						        StringTokenizer st = new StringTokenizer(dept,"|");
						        String[] tmp = new String[2] ;
						        int index =0;
						        while(st.hasMoreElements()){
						            tmp[index++] = (String)st.nextElement();
						        }
                    		%>
                        		<!-- 
                        		<option value='<%=tmp[0]%>' <%if(deptList.size()==1) out.print("selected");%>><%=tmp[1]%></option>
                        		-->
                        		<option value='<%=tmp[0]%>'><%=tmp[1]%></option>
                    		<%
                    		}
                    		%>
                        	</select><font color='red'>&nbsp;*</font>
                        </div>
                    </td>
	                <td class=top align=left> 
	                    <div align="center" class="txt_content">配送方式</div>
	                </td>
                    <td class=top align=middle > 
                        <div align='left' class='txt_content'> 
                        	<select id='delivermode' name='delivermode' onchange="psfschange();" onKeyDown="keydown2('balancemode')">
                        		<option value='1'>送货上门</option>
                        		<option value='2'>其他</option>
                        	</select><font color='red'>&nbsp;*</font>
                        </div>
	                    <div align='left' class='txt_content' > 
	                        <input type="text" id='delivermode_' name='delivermode_' size="8" value='' style='display:none'>
	                    </div>                        
                    </td>
	                <td class=top align=middle> 
	                    <div align="center" class="txt_content" style="display:none;">结算方式</div>
	                </td>
                    <td class=top align=middle > 
                        <div align='left' class='txt_content' style="display:none;"> 
                        	<select id='balancemode' name='balancemode' onchange="jsfschange();" onKeyDown="keydown2('delivergoodsid')">
                        		<option value='1'>定期结算</option>
                        		<option value='2'>其他</option>
                        	</select><font color='red'>&nbsp;*</font>
                        </div>
	                    <div align='left' class='txt_content' > 
	                        <input type="text" id='balancemode_' name='balancemode_' size="8" value='' style='display:none'>
	                    </div>
                    </td>

                </tr>

                <tr class="bg_row_odd" height=20> 
	                <td class=top align=middle> 
	                    <div align="center" class="txt_content">送货单号</div>
	                </td>
                    <td class=top align=middle> 
                        <div align='left' class='txt_content'> 
                        	<input type='text' id='delivergoodsid' size='13' name='delivergoodsid' value='' onKeyDown="checkDeliverGoodsId()"><font color='red'>&nbsp;*</font>
                        </div>
                    </td>
	                <td class=top align=middle> 
	                    <div align="center" class="txt_content">签收日期</div>
	                </td>
                    
                    <td class=top align=middle nowrap > 
                        <div align='left' class='txt_content'> 
                        	<input type='text' id='signindate' size='13' name='signindate' value='<%=DateUtil.getCurrentDate("yyyy-MM-dd")%>' readonly onfocus='setday(this,document.getElementById("signinperson"))' onKeyDown="keydown2('signinperson')"><font color='red'>&nbsp;*</font>
                        </div>
                    </td>
	                <td class=top align=middle> 
	                    <div align="center" class="txt_content">签收人</div>
	                </td>
                    
                    <td class=top align=middle nowrap > 
                        <div align='left' class='txt_content'> 
                        	<input type='text' id='signinperson' size='13' name='signinperson' value='' onKeyDown="keydown2('deliveraddr')"><font color='red'>&nbsp;*</font>
                        </div>
                    </td>                
                </tr>
                                
                <tr class="bg_row_odd" height=20> 
	                <td class=top align=middle> 
	                    <div align="center" class="txt_content">送货地址</div>
	                </td>
                    <td class=top align=middle> 
                        <div align='left' class='txt_content'> 
                        	<select id='deliveraddr' name='deliveraddr' onChange='changeDeliverAddr();' onKeyDown="keydown2('linkman_')">
                        		<option value=''>请选择..</option>
								<%if(deptList.size()==1){%><script language='javascript'>changeDeliverAddrByDept();</script><%}%>
                        	</select><font color='red'>&nbsp;*</font>
                        </div>
                    </td>
	                <td class=top align=middle> 
	                    <div align="center" class="txt_content">联系人</div>
	                </td>
                    
                    <td class=top align=middle nowrap id='linkman'> 
                        <div align='left' class='txt_content'> 
                        	<input type='text' id='linkman_' size='13' name='linkman_' value='' onKeyDown="keydown2('linktel_')">
                        </div>
                    </td>
	                <td class=top align=middle> 
	                    <div align="center" class="txt_content">联系电话</div>
	                </td>
                    
                    <td class=top align=middle nowrap id='linktel'> 
                        <div align='left' class='txt_content'> 
                        	<input type='text' id='linktel_' size='13' name='linktel_' value='' onKeyDown="keydown2('providername')">
                        </div>
                    </td>                
                </tr>
                
                <tr class="bg_row_odd" height=20>
                	<td class=top align=middle> 
                        <div align="center" class="txt_content">供应商</div>
                    </td>
                    <td class=top align=middle colspan='5'> 
                        <div align="left" class="txt_content"> 
                        <input type='text' id="providername" size='13' name='providername' value='' onKeyDown="if (event.keyCode==13){checkProvider();keydown2('Textarea1');}">&nbsp;
                        <input type='hidden' id="providerid" name='providerid' value='' >
                        <input type='button' class="kuang" value='查找' onclick='selectProvider()'>&nbsp;
                        <input type='button' id='addprovider' class="kuang" value='新增' onclick='newprovider()'>&nbsp;&nbsp;&nbsp;&nbsp;
                        <font color=red>(可直接输入供应商名称并按回车检查供应上是否存在)</font>
                        </div>
                    </td>
                </tr>
                
                <tr class="bg_row_odd" height=20> 
                    <td class=top align=middle> 
                        <div align="center" class="txt_content">备注</div>
                    </td>
                    <td class=top align=middle colspan='5'> 
                        <div align="left" class="txt_content"> 
                        <textarea id="Textarea1" style="WIDTH: 100%; HEIGHT: 50px" name="notes" onKeyDown="keydown2('manufacturename1')"></textarea>
                        </div>
                    </td>
                </tr>
                
                </tbody> 
            </table>
        </td>
    </tr>
</table>

<center>




    <table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
    	<input type='hidden' id='currentrownum' name='currentrownum' value='1'>
        <tr> 
            <td> 
                <table class=bg_table id=tableId	cellspacing=1 cellpadding=2 width=100% align=center border=0>
                    <tbody> 
                    <tr class="bg_column" height=20> 
                    	<td align=middle colspan="12">
	                    	<div align="center"><b>送货单产品录入</b></div>

                    	</td>
	                </tr>
	                
	                <tr class="bg_column" height=20> 
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"></div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 产品名称</div>
                        </td>                        
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 规格</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 型号</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 品牌</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 生产厂商</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 签收数量</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 单位</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 签收价格</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 总价</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 附加属性</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 结算模式</div>
                        </td>
                    </tr>


<!--第一行-->
                    <tr id='tr1' class="bg_row_even" height=20 > 
                        <td class=top align=middle> 
                            <div align="center" class="txt_content">
	                           <input type='button' class="kuang" value='重置' onclick='resetrow(1);'>
                            </div>
                        </td>
                        <!--产品名称-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content" > 
								<input type="text" id='manufacturename1' name='manufacturename' size="8" maxlength="11" onKeyDown="keydown2('spec1')">
							</div>
                        </td>
                        <!--规格-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
								<input type="text" id='spec1' name='spec' size="8" maxlength="11"  onKeyDown="keydown2('type1')">
							</div>
                        </td>
                        <!--型号-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='type1' name='type' size="8" maxlength="11"  onKeyDown="keydown2('brand1')">
							</div>
                        </td>
                        <!--品牌-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='brand1' name='brand' size="8" maxlength="11" onKeyDown="keydown2('manufacturer1')">
							</div>
                        </td>
                        <!--生产厂商-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='manufacturer1' name='manufacturer' size="8" maxlength="11" onKeyDown="keydown2('ordercount1')">
							</div>
                        </td>
                        <!--签收数量-->
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='ordercount1' name='ordercount' size="8" maxlength="11" onKeyDown="keydown2('quantunit1')" onKeyUp="formatordercount(1)">
							</div>
                        </td>
                        <!--单位-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='quantunit1' name='quantunit' size="8" maxlength="11"  onKeyDown="keydown2('signinprice1')"> 
							</div>
                        </td>                        

                        <!--签收价格-->
                        <td class=top align=middle> 
                            <div align='center' class='txt_content'> 
                            	<input type="text" id='signinprice1' name='signinprice' size="8" maxlength="11"  onKeyDown="keydown2('otherproperties1')" onKeyUp='checkSignPrice(1)'> 
                            </div>
                        </td>
						<!--总价-->
						<td class="top" align="center">
							<div align="center" class="txt_content" >
								<input type="text" id='totalprice1' name='totalprice' size="8" maxlength="11" readonly> 
							</div>
						</td>	
						<!--附加属性-->
						<td class="top" align="center">
							<div align="center" class="txt_content" >	
								<input type="text" id='otherproperties1' name='otherproperties' size="8" maxlength="200"  onKeyDown="keydown2('manufacturename2')"> 
							</div>
						</td>	
                        <!--结算模式-->
                        <td class="top" align="center">
                            <div align="center" class="txt_content" >   
                                <select id="mode1" name="mode">
                                <option value="<%=GSBaseConstants.BALANCE_MODE1 %>"><%=DefineDic.getBalanceMode(GSBaseConstants.BALANCE_MODE1) %></option>
                                <option value="<%=GSBaseConstants.BALANCE_MODE2 %>"><%=DefineDic.getBalanceMode(GSBaseConstants.BALANCE_MODE2) %></option>
                                </select> 
                            </div>
                       </td> 
                    </tr>

<!--第二行-->
                    <tr id='tr2' class="bg_row_even" height=20 > 
                        <td class=top align=middle> 
                            <div align="center" class="txt_content">
	                           <input type='button' class="kuang" value='重置' onclick='resetrow(2);'>
                            </div>
                        </td>
                        <!--产品名称-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content" > 
								<input type="text" id='manufacturename2' name='manufacturename' size="8" maxlength="11" onKeyDown="keydown2('spec2')">
							</div>
                        </td>
                        <!--规格-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
								<input type="text" id='spec2' name='spec' size="8" maxlength="11"  onKeyDown="keydown2('type2')">
							</div>
                        </td>
                        <!--型号-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='type2' name='type' size="8" maxlength="11"  onKeyDown="keydown2('brand2')">
							</div>
                        </td>
                        <!--品牌-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='brand2' name='brand' size="8" maxlength="11" onKeyDown="keydown2('manufacturer2')">
							</div>
                        </td>
                        <!--生产厂商-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='manufacturer2' name='manufacturer' size="8" maxlength="11" onKeyDown="keydown2('ordercount2')">
							</div>
                        </td>
                        <!--签收数量-->
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='ordercount2' name='ordercount' size="8" maxlength="11" onKeyDown="keydown2('quantunit2')" onKeyUp="formatordercount(2)">
							</div>
                        </td>
                        <!--单位-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='quantunit2' name='quantunit' size="8" maxlength="11"  onKeyDown="keydown2('signinprice2')"> 
							</div>
                        </td>                        

                        <!--签收价格-->
                        <td class=top align=middle> 
                            <div align='center' class='txt_content'> 
                            	<input type="text" id='signinprice2' name='signinprice' size="8" maxlength="11"  onKeyDown="keydown2('otherproperties2')" onKeyUp='checkSignPrice(2)'> 
                            </div>
                        </td>
						<!--总价-->
						<td class="top" align="center">
							<div align="center" class="txt_content" >
								<input type="text" id='totalprice2' name='totalprice' size="8" maxlength="11" readonly> 
							</div>
						</td>	
						<!--附加属性-->
						<td class="top" align="center">
							<div align="center" class="txt_content" >	
								<input type="text" id='otherproperties2' name='otherproperties' size="8" maxlength="200"  onKeyDown="keydown2('manufacturename3')"> 
							</div>
						</td>	
<!--结算模式-->
                        <td class="top" align="center">
                            <div align="center" class="txt_content" >   
                                <select id="mode2" name="mode">
                                <option value="<%=GSBaseConstants.BALANCE_MODE1 %>"><%=DefineDic.getBalanceMode(GSBaseConstants.BALANCE_MODE1) %></option>
                                <option value="<%=GSBaseConstants.BALANCE_MODE2 %>"><%=DefineDic.getBalanceMode(GSBaseConstants.BALANCE_MODE2) %></option>
                                </select> 
                            </div>
                       </td> 

                    </tr>
<!--第三行-->
                    <tr id='tr3' class="bg_row_even" height=20 > 
                        <td class=top align=middle> 
                            <div align="center" class="txt_content">
	                           <input type='button' class="kuang" value='重置' onclick='resetrow(3);'>
                            </div>
                        </td>
                        <!--产品名称-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content" > 
								<input type="text" id='manufacturename3' name='manufacturename' size="8" maxlength="11" onKeyDown="keydown2('spec3')">
							</div>
                        </td>
                        <!--规格-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
								<input type="text" id='spec3' name='spec' size="8" maxlength="11"  onKeyDown="keydown2('type3')">
							</div>
                        </td>
                        <!--型号-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='type3' name='type' size="8" maxlength="11"  onKeyDown="keydown2('brand3')">
							</div>
                        </td>
                        <!--品牌-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='brand3' name='brand' size="8" maxlength="11" onKeyDown="keydown2('manufacturer3')">
							</div>
                        </td>
                        <!--生产厂商-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='manufacturer3' name='manufacturer' size="8" maxlength="11" onKeyDown="keydown2('ordercount3')">
							</div>
                        </td>
                        <!--签收数量-->
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='ordercount3' name='ordercount' size="8" maxlength="11" onKeyDown="keydown2('quantunit3')" onKeyUp="formatordercount(3)">
							</div>
                        </td>
                        <!--单位-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='quantunit3' name='quantunit' size="8" maxlength="11"  onKeyDown="keydown2('signinprice3')"> 
							</div>
                        </td>                        

                        <!--签收价格-->
                        <td class=top align=middle> 
                            <div align='center' class='txt_content'> 
                            	<input type="text" id='signinprice3' name='signinprice' size="8" maxlength="11"  onKeyDown="keydown2('otherproperties3')" onKeyUp='checkSignPrice(3)'> 
                            </div>
                        </td>
						<!--总价-->
						<td class="top" align="center">
							<div align="center" class="txt_content" >
								<input type="text" id='totalprice3' name='totalprice' size="8" maxlength="11" readonly> 
							</div>
						</td>	
						<!--附加属性-->
						<td class="top" align="center">
							<div align="center" class="txt_content" >	
								<input type="text" id='otherproperties3' name='otherproperties' size="8" maxlength="200"  onKeyDown="keydown2('manufacturename4')"> 
							</div>
						</td>	
<!--结算模式-->
                        <td class="top" align="center">
                            <div align="center" class="txt_content" >   
                                <select id="mode3" name="mode">
                                <option value="<%=GSBaseConstants.BALANCE_MODE1 %>"><%=DefineDic.getBalanceMode(GSBaseConstants.BALANCE_MODE1) %></option>
                                <option value="<%=GSBaseConstants.BALANCE_MODE2 %>"><%=DefineDic.getBalanceMode(GSBaseConstants.BALANCE_MODE2) %></option>
                                </select> 
                            </div>
                       </td> 

                    </tr>
<!--第四行-->
                    <tr id='tr4' class="bg_row_even" height=20 > 
                        <td class=top align=middle> 
                            <div align="center" class="txt_content">
	                           <input type='button' class="kuang" value='重置' onclick='resetrow(4);'>
                            </div>
                        </td>
                        <!--产品名称-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content" > 
								<input type="text" id='manufacturename4' name='manufacturename' size="8" maxlength="11" onKeyDown="keydown2('spec4')">
							</div>
                        </td>
                        <!--规格-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
								<input type="text" id='spec4' name='spec' size="8" maxlength="11"  onKeyDown="keydown2('type4')">
							</div>
                        </td>
                        <!--型号-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='type4' name='type' size="8" maxlength="11"  onKeyDown="keydown2('brand4')">
							</div>
                        </td>
                        <!--品牌-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='brand4' name='brand' size="8" maxlength="11" onKeyDown="keydown2('manufacturer4')">
							</div>
                        </td>
                        <!--生产厂商-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='manufacturer4' name='manufacturer' size="8" maxlength="11" onKeyDown="keydown2('ordercount4')">
							</div>
                        </td>
                        <!--签收数量-->
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='ordercount4' name='ordercount' size="8" maxlength="11" onKeyDown="keydown2('quantunit4')" onKeyUp="formatordercount(4)">
							</div>
                        </td>
                        <!--单位-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='quantunit4' name='quantunit' size="8" maxlength="11"  onKeyDown="keydown2('signinprice4')"> 
							</div>
                        </td>                        

                        <!--签收价格-->
                        <td class=top align=middle> 
                            <div align='center' class='txt_content'> 
                            	<input type="text" id='signinprice4' name='signinprice' size="8" maxlength="11"  onKeyDown="keydown2('otherproperties4')" onKeyUp='checkSignPrice(4)'> 
                            </div>
                        </td>
						<!--总价-->
						<td class="top" align="center">
							<div align="center" class="txt_content" >
								<input type="text" id='totalprice4' name='totalprice' size="8" maxlength="11" readonly> 
							</div>
						</td>	
						<!--附加属性-->
						<td class="top" align="center">
							<div align="center" class="txt_content" >	
								<input type="text" id='otherproperties4' name='otherproperties' size="8" maxlength="200"  onKeyDown="keydown2('manufacturename5')"> 
							</div>
						</td>	
<!--结算模式-->
                        <td class="top" align="center">
                            <div align="center" class="txt_content" >   
                                <select id="mode4" name="mode">
                                <option value="<%=GSBaseConstants.BALANCE_MODE1 %>"><%=DefineDic.getBalanceMode(GSBaseConstants.BALANCE_MODE1) %></option>
                                <option value="<%=GSBaseConstants.BALANCE_MODE2 %>"><%=DefineDic.getBalanceMode(GSBaseConstants.BALANCE_MODE2) %></option>
                                </select> 
                            </div>
                       </td> 

                    </tr>
<!--第五行-->
                    <tr id='tr5' class="bg_row_even" height=20 > 
                        <td class=top align=middle> 
                            <div align="center" class="txt_content">
	                           <input type='button' class="kuang" value='重置' onclick='resetrow(5);'>
                            </div>
                        </td>
                        <!--产品名称-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content" > 
								<input type="text" id='manufacturename5' name='manufacturename' size="8" maxlength="11" onKeyDown="keydown2('spec5')">
							</div>
                        </td>
                        <!--规格-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
								<input type="text" id='spec5' name='spec' size="8" maxlength="11"  onKeyDown="keydown2('type5')">
							</div>
                        </td>
                        <!--型号-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='type5' name='type' size="8" maxlength="11"  onKeyDown="keydown2('brand5')">
							</div>
                        </td>
                        <!--品牌-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='brand5' name='brand' size="8" maxlength="11" onKeyDown="keydown2('manufacturer5')">
							</div>
                        </td>
                        <!--生产厂商-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='manufacturer5' name='manufacturer' size="8" maxlength="11" onKeyDown="keydown2('ordercount5')">
							</div>
                        </td>
                        <!--签收数量-->
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='ordercount5' name='ordercount' size="8" maxlength="11" onKeyDown="keydown2('quantunit5')" onKeyUp="formatordercount(5)">
							</div>
                        </td>
                        <!--单位-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='quantunit5' name='quantunit' size="8" maxlength="11"  onKeyDown="keydown2('signinprice5')"> 
							</div>
                        </td>                        

                        <!--签收价格-->
                        <td class=top align=middle> 
                            <div align='center' class='txt_content'> 
                            	<input type="text" id='signinprice5' name='signinprice' size="8" maxlength="11"  onKeyDown="keydown2('otherproperties5')" onKeyUp='checkSignPrice(5)'> 
                            </div>
                        </td>
						<!--总价-->
						<td class="top" align="center">
							<div align="center" class="txt_content" >
								<input type="text" id='totalprice5' name='totalprice' size="8" maxlength="11" readonly> 
							</div>
						</td>	
						<!--附加属性-->
						<td class="top" align="center">
							<div align="center" class="txt_content" >	
								<input type="text" id='otherproperties5' name='otherproperties' size="8" maxlength="200"  onKeyDown="keydown2('manufacturename6')"> 
							</div>
						</td>	
<!--结算模式-->
                        <td class="top" align="center">
                            <div align="center" class="txt_content" >   
                                <select id="mode5" name="mode">
                                <option value="<%=GSBaseConstants.BALANCE_MODE1 %>"><%=DefineDic.getBalanceMode(GSBaseConstants.BALANCE_MODE1) %></option>
                                <option value="<%=GSBaseConstants.BALANCE_MODE2 %>"><%=DefineDic.getBalanceMode(GSBaseConstants.BALANCE_MODE2) %></option>
                                </select> 
                            </div>
                       </td> 

                    </tr>
<!--第六行-->
                    <tr id='tr6' class="bg_row_even" height=20 > 
                        <td class=top align=middle> 
                            <div align="center" class="txt_content">
	                           <input type='button' class="kuang" value='重置' onclick='resetrow(6);'>
                            </div>
                        </td>
                        <!--产品名称-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content" > 
								<input type="text" id='manufacturename6' name='manufacturename' size="8" maxlength="11" onKeyDown="keydown2('spec6')">
							</div>
                        </td>
                        <!--规格-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
								<input type="text" id='spec6' name='spec' size="8" maxlength="11"  onKeyDown="keydown2('type6')">
							</div>
                        </td>
                        <!--型号-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='type6' name='type' size="8" maxlength="11"  onKeyDown="keydown2('brand6')">
							</div>
                        </td>
                        <!--品牌-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='brand6' name='brand' size="8" maxlength="11" onKeyDown="keydown2('manufacturer6')">
							</div>
                        </td>
                        <!--生产厂商-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='manufacturer6' name='manufacturer' size="8" maxlength="11" onKeyDown="keydown2('ordercount6')">
							</div>
                        </td>
                        <!--签收数量-->
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='ordercount6' name='ordercount' size="8" maxlength="11" onKeyDown="keydown2('quantunit6')" onKeyUp="formatordercount(6)">
							</div>
                        </td>
                        <!--单位-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='quantunit6' name='quantunit' size="8" maxlength="11"  onKeyDown="keydown2('signinprice6')"> 
							</div>
                        </td>                        

                        <!--签收价格-->
                        <td class=top align=middle> 
                            <div align='center' class='txt_content'> 
                            	<input type="text" id='signinprice6' name='signinprice' size="8" maxlength="11"  onKeyDown="keydown2('otherproperties6')" onKeyUp='checkSignPrice(6)'> 
                            </div>
                        </td>
						<!--总价-->
						<td class="top" align="center">
							<div align="center" class="txt_content" >
								<input type="text" id='totalprice6' name='totalprice' size="8" maxlength="11" readonly> 
							</div>
						</td>	
						<!--附加属性-->
						<td class="top" align="center">
							<div align="center" class="txt_content" >	
								<input type="text" id='otherproperties6' name='otherproperties' size="8" maxlength="200"  onKeyDown="keydown2('manufacturename7')"> 
							</div>
						</td>	
<!--结算模式-->
                        <td class="top" align="center">
                            <div align="center" class="txt_content" >   
                                <select id="mode6" name="mode">
                                <option value="<%=GSBaseConstants.BALANCE_MODE1 %>"><%=DefineDic.getBalanceMode(GSBaseConstants.BALANCE_MODE1) %></option>
                                <option value="<%=GSBaseConstants.BALANCE_MODE2 %>"><%=DefineDic.getBalanceMode(GSBaseConstants.BALANCE_MODE2) %></option>
                                </select> 
                            </div>
                       </td> 

                    </tr>
<!--第七行-->
                    <tr id='tr7' class="bg_row_even" height=20 > 
                        <td class=top align=middle> 
                            <div align="center" class="txt_content">
	                           <input type='button' class="kuang" value='重置' onclick='resetrow(7);'>
                            </div>
                        </td>
                        <!--产品名称-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content" > 
								<input type="text" id='manufacturename7' name='manufacturename' size="8" maxlength="11" onKeyDown="keydown2('spec7')">
							</div>
                        </td>
                        <!--规格-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
								<input type="text" id='spec7' name='spec' size="8" maxlength="11"  onKeyDown="keydown2('type7')">
							</div>
                        </td>
                        <!--型号-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='type7' name='type' size="8" maxlength="11"  onKeyDown="keydown2('brand7')">
							</div>
                        </td>
                        <!--品牌-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='brand7' name='brand' size="8" maxlength="11" onKeyDown="keydown2('manufacturer7')">
							</div>
                        </td>
                        <!--生产厂商-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='manufacturer7' name='manufacturer' size="8" maxlength="11" onKeyDown="keydown2('ordercount7')">
							</div>
                        </td>
                        <!--签收数量-->
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='ordercount7' name='ordercount' size="8" maxlength="11" onKeyDown="keydown2('quantunit7')" onKeyUp="formatordercount(7)">
							</div>
                        </td>
                        <!--单位-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='quantunit7' name='quantunit' size="8" maxlength="11"  onKeyDown="keydown2('signinprice7')"> 
							</div>
                        </td>                        

                        <!--签收价格-->
                        <td class=top align=middle> 
                            <div align='center' class='txt_content'> 
                            	<input type="text" id='signinprice7' name='signinprice' size="8" maxlength="11"  onKeyDown="keydown2('otherproperties7')" onKeyUp='checkSignPrice(7)'> 
                            </div>
                        </td>
						<!--总价-->
						<td class="top" align="center">
							<div align="center" class="txt_content" >
								<input type="text" id='totalprice7' name='totalprice' size="8" maxlength="11" readonly> 
							</div>
						</td>	
						<!--附加属性-->
						<td class="top" align="center">
							<div align="center" class="txt_content" >	
								<input type="text" id='otherproperties7' name='otherproperties' size="8" maxlength="200"  onKeyDown="keydown2('manufacturename8')"> 
							</div>
						</td>	
<!--结算模式-->
                        <td class="top" align="center">
                            <div align="center" class="txt_content" >   
                                <select id="mode7" name="mode">
                                <option value="<%=GSBaseConstants.BALANCE_MODE1 %>"><%=DefineDic.getBalanceMode(GSBaseConstants.BALANCE_MODE1) %></option>
                                <option value="<%=GSBaseConstants.BALANCE_MODE2 %>"><%=DefineDic.getBalanceMode(GSBaseConstants.BALANCE_MODE2) %></option>
                                </select> 
                            </div>
                       </td> 

                    </tr>
<!--第八行-->
                    <tr id='tr8' class="bg_row_even" height=20 > 
                        <td class=top align=middle> 
                            <div align="center" class="txt_content">
	                           <input type='button' class="kuang" value='重置' onclick='resetrow(8);'>
                            </div>
                        </td>
                        <!--产品名称-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content" > 
								<input type="text" id='manufacturename8' name='manufacturename' size="8" maxlength="11" onKeyDown="keydown2('spec8')">
							</div>
                        </td>
                        <!--规格-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
								<input type="text" id='spec8' name='spec' size="8" maxlength="11"  onKeyDown="keydown2('type8')">
							</div>
                        </td>
                        <!--型号-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='type8' name='type' size="8" maxlength="11"  onKeyDown="keydown2('brand8')">
							</div>
                        </td>
                        <!--品牌-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='brand8' name='brand' size="8" maxlength="11" onKeyDown="keydown2('manufacturer8')">
							</div>
                        </td>
                        <!--生产厂商-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='manufacturer8' name='manufacturer' size="8" maxlength="11" onKeyDown="keydown2('ordercount8')">
							</div>
                        </td>
                        <!--签收数量-->
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='ordercount8' name='ordercount' size="8" maxlength="11" onKeyDown="keydown2('quantunit8')" onKeyUp="formatordercount(8)">
							</div>
                        </td>
                        <!--单位-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='quantunit8' name='quantunit' size="8" maxlength="11"  onKeyDown="keydown2('signinprice8')"> 
							</div>
                        </td>                        

                        <!--签收价格-->
                        <td class=top align=middle> 
                            <div align='center' class='txt_content'> 
                            	<input type="text" id='signinprice8' name='signinprice' size="8" maxlength="11"  onKeyDown="keydown2('otherproperties8')" onKeyUp='checkSignPrice(8)'> 
                            </div>
                        </td>
						<!--总价-->
						<td class="top" align="center">
							<div align="center" class="txt_content" >
								<input type="text" id='totalprice8' name='totalprice' size="8" maxlength="11" readonly> 
							</div>
						</td>	
						<!--附加属性-->
						<td class="top" align="center">
							<div align="center" class="txt_content" >	
								<input type="text" id='otherproperties8' name='otherproperties' size="8" maxlength="200"  onKeyDown="keydown2('manufacturename9')"> 
							</div>
						</td>	
<!--结算模式-->
                        <td class="top" align="center">
                            <div align="center" class="txt_content" >   
                                <select id="mode8" name="mode">
                                <option value="<%=GSBaseConstants.BALANCE_MODE1 %>"><%=DefineDic.getBalanceMode(GSBaseConstants.BALANCE_MODE1) %></option>
                                <option value="<%=GSBaseConstants.BALANCE_MODE2 %>"><%=DefineDic.getBalanceMode(GSBaseConstants.BALANCE_MODE2) %></option>
                                </select> 
                            </div>
                       </td> 

                    </tr>
<!--第九行-->
                    <tr id='tr9' class="bg_row_even" height=20 > 
                        <td class=top align=middle> 
                            <div align="center" class="txt_content">
	                           <input type='button' class="kuang" value='重置' onclick='resetrow(9);'>
                            </div>
                        </td>
                        <!--产品名称-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content" > 
								<input type="text" id='manufacturename9' name='manufacturename' size="8" maxlength="11" onKeyDown="keydown2('spec9')">
							</div>
                        </td>
                        <!--规格-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
								<input type="text" id='spec9' name='spec' size="8" maxlength="11"  onKeyDown="keydown2('type9')">
							</div>
                        </td>
                        <!--型号-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='type9' name='type' size="8" maxlength="11"  onKeyDown="keydown2('brand9')">
							</div>
                        </td>
                        <!--品牌-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='brand9' name='brand' size="8" maxlength="11" onKeyDown="keydown2('manufacturer9')">
							</div>
                        </td>
                        <!--生产厂商-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='manufacturer9' name='manufacturer' size="8" maxlength="11" onKeyDown="keydown2('ordercount9')">
							</div>
                        </td>
                        <!--签收数量-->
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='ordercount9' name='ordercount' size="8" maxlength="11" onKeyDown="keydown2('quantunit9')" onKeyUp="formatordercount(9)">
							</div>
                        </td>
                        <!--单位-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='quantunit9' name='quantunit' size="8" maxlength="11"  onKeyDown="keydown2('signinprice9')"> 
							</div>
                        </td>                        

                        <!--签收价格-->
                        <td class=top align=middle> 
                            <div align='center' class='txt_content'> 
                            	<input type="text" id='signinprice9' name='signinprice' size="8" maxlength="11"  onKeyDown="keydown2('otherproperties9')" onKeyUp='checkSignPrice(9)'> 
                            </div>
                        </td>
						<!--总价-->
						<td class="top" align="center">
							<div align="center" class="txt_content" >
								<input type="text" id='totalprice9' name='totalprice' size="8" maxlength="11" readonly> 
							</div>
						</td>	
						<!--附加属性-->
						<td class="top" align="center">
							<div align="center" class="txt_content" >	
								<input type="text" id='otherproperties9' name='otherproperties' size="8" maxlength="200"  onKeyDown="keydown2('manufacturename10')"> 
							</div>
						</td>	
<!--结算模式-->
                        <td class="top" align="center">
                            <div align="center" class="txt_content" >   
                                <select id="mode9" name="mode">
                                <option value="<%=GSBaseConstants.BALANCE_MODE1 %>"><%=DefineDic.getBalanceMode(GSBaseConstants.BALANCE_MODE1) %></option>
                                <option value="<%=GSBaseConstants.BALANCE_MODE2 %>"><%=DefineDic.getBalanceMode(GSBaseConstants.BALANCE_MODE2) %></option>
                                </select> 
                            </div>
                       </td> 

                    </tr>
<!--第十行-->
                    <tr id='tr10' class="bg_row_even" height=20 > 
                        <td class=top align=middle> 
                            <div align="center" class="txt_content">
	                           <input type='button' class="kuang" value='重置' onclick='resetrow(10);'>
                            </div>
                        </td>
                        <!--产品名称-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content" > 
								<input type="text" id='manufacturename10' name='manufacturename' size="8" maxlength="11" onKeyDown="keydown2('spec10')">
							</div>
                        </td>
                        <!--规格-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
								<input type="text" id='spec10' name='spec' size="8" maxlength="11"  onKeyDown="keydown2('type10')">
							</div>
                        </td>
                        <!--型号-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='type10' name='type' size="8" maxlength="11"  onKeyDown="keydown2('brand10')">
							</div>
                        </td>
                        <!--品牌-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='brand10' name='brand' size="8" maxlength="11" onKeyDown="keydown2('manufacturer10')">
							</div>
                        </td>
                        <!--生产厂商-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='manufacturer10' name='manufacturer' size="8" maxlength="11" onKeyDown="keydown2('ordercount10')">
							</div>
                        </td>
                        <!--签收数量-->
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='ordercount10' name='ordercount' size="8" maxlength="11" onKeyDown="keydown2('quantunit10')" onKeyUp="formatordercount(10)">
							</div>
                        </td>
                        <!--单位-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='quantunit10' name='quantunit' size="8" maxlength="11"  onKeyDown="keydown2('signinprice10')"> 
							</div>
                        </td>                        

                        <!--签收价格-->
                        <td class=top align=middle> 
                            <div align='center' class='txt_content'> 
                            	<input type="text" id='signinprice10' name='signinprice' size="8" maxlength="11"  onKeyDown="keydown2('otherproperties10')" onKeyUp='checkSignPrice(10)'> 
                            </div>
                        </td>
						<!--总价-->
						<td class="top" align="center">
							<div align="center" class="txt_content" >
								<input type="text" id='totalprice10' name='totalprice' size="8" maxlength="11" readonly> 
							</div>
						</td>	
						<!--附加属性-->
						<td class="top" align="center">
							<div align="center" class="txt_content" >	
								<input type="text" id='otherproperties10' name='otherproperties' size="8" maxlength="200"  onKeyDown="keydown2('aaaaa')"> 
							</div>
						</td>	
<!--结算模式-->
                        <td class="top" align="center">
                            <div align="center" class="txt_content" >   
                                <select id="mode10" name="mode">
                                <option value="<%=GSBaseConstants.BALANCE_MODE1 %>"><%=DefineDic.getBalanceMode(GSBaseConstants.BALANCE_MODE1) %></option>
                                <option value="<%=GSBaseConstants.BALANCE_MODE2 %>"><%=DefineDic.getBalanceMode(GSBaseConstants.BALANCE_MODE2) %></option>
                                </select> 
                            </div>
                       </td> 

                    </tr>
					
                    </tbody> 
                </table>
            </td>
        </tr>
    </table>
    <p align="center">  
    </p>
</form>

<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
	<tr>
<!--
		<td width=100% align=middle id="createorderid">
			<input type="image" src="<%=response.encodeURL(root+"/images/button/shengcheng.gif")%>" width="58" height="24" class="box" onclick="createOrderCode();return false;">
		</td>
-->

		<td width=100% align=middle id="submitform">
			<input type="button" class="kuang" id='aaaaa' value="保存并继续录入" onclick="openconfirm('SA');return false;">
			<input type="button" class="kuang" value="保存" onclick="openconfirm('S');return false;">
			<input type='hidden' name='middleview'>
		</td>

	<tr>
</table>

<div style="text-align:center;visibility:hidden" id="queding" name="queding">
<!--	   <input type="image" src="images/cx.jpg" width="58" height="24" class="box" onclick="form1.submit()">-->
<input type="button" value="" onClick="form1.submit();" class="kuang" value="完成">
</div>
</center>
<iframe id='iframe1' name="iframe1" src="<%=response.encodeURL(root+"/template.jsp")%>" width="0" height="0" frameborder = "0"></iframe>

<script language='javascript'>
	function formatordercount(val){
		var obj = document.getElementById("ordercount"+val);

		if(isNaN(obj.value)){
			alert("签收数量必须为数字（包含小数）!");
			return false;		
		}	
	    if(document.getElementById("signinprice"+val).value != null && document.getElementById("signinprice"+val).value != ""){
			calculate2(val);
	    }
	}
	
	function openconfirm(val){
		if (!judgeStrLen("Textarea1")) return false;
		if(ivmanuf()){
			if(checkNoneableValue()){
				var url="<%=response.encodeURL(root+"/jsp/paymanage/deliverordermiddleview.jsp")%>?val="+val;
				window.open(url,null," center=Yes, help=No, resizable=Yes, status=Yes, width=960px, height=680px, scrollbars=yes");		
			}
		}
	}
	
	function middleviewsubmit(val){
		if(document.all.middleview.value == "T")
			submitForm(val);
			//alert("开始提交："+val);
	}
	
	function initprovider(var1,var2,var3){
		var tempoption=new Option(var2,var3);
		document.all.providerid.options[var1+1]=tempoption;
	}
	
	function checkSignPrice(val){
		if(document.getElementById("ordercount"+val).value != null && document.getElementById("ordercount"+val).value != ""){
			calculate2(val);
	    }
	}
	
	function calculate2(index){
		var vcount = parseFloat(document.getElementById("ordercount"+index).value);
		var vsign = parseFloat(document.getElementById("signinprice"+index).value);
		
		var temp  = vcount * vsign;
		document.getElementById("totalprice"+index).value = temp.toFixed(4);
		
	}
	
	function calTotalSum(){
		var totsum = 0;
		for(var j=1; j<=10;j++){
			var count = document.getElementById("ordercount"+j).value;
			var price = document.getElementById("signinprice"+j).value;
			if((count == null || count == "") && (price == null || price == "")){
				continue;
			}
			totsum = totsum + parseFloat(count)*parseFloat(price);
		}		
		totalSum.innerText = "总价:"+ totsum.toFixed(4); 
	}	
	
	function keydown2(id){
		if(event.keyCode==13) {
			var obj = document.getElementById(id);
			obj.focus();
		}
	}
	function judgeStrLen(name)
	{
		var str = document.getElementById(name).value;
		if (str == null || str.length == 0) return true;
		if (StrLen(str)><%=memoLen%>)
		{
			alert("备注长度不能超过<%=memoLen/2%>个汉字！");
			return false;
		}
		return true;
	}	
</script>
</body>
</html>